শৈবাল: একটি কাস্টম তালিকা আপডেট করার প্রণালী

SDK-র মাধ্যমে কাস্টম তালিকা আপডেট করার অনেক ভাল উদাহরণ আছে. এখানে এখনো হয় অন্য.

ব্যবসায় সমস্যা: InfoPath ফর্ম ব্যবহারকারীদের অনলাইন ক্রয় requisitions প্রবেশ করতে সক্ষম হবেন যে ডিজাইন করা হয়েছে. ডাকঘর অধিযাচন সংখ্যা ঐতিহ্যগত ক্রম ভিত্তিক পূর্ণসংখ্যা মান হতে হবে এবং স্বয়ংক্রিয়ভাবে হিসাব করা উচিত.

ব্যবসা সমাধান: দুই কলাম ধারণকারী একটি কাস্টম MOSS তালিকা তৈরি করুন: "ControlField" and "ControlValue". মান কলাম পরের ক্রয় অধিযাচন সংখ্যা উপস্থিত রয়েছে. Note that the generic "control" প্রচলিত রীতি অনুযায়ী নামকরণের প্রয়োজন হিসাবে ব্যবহার করা যেতে পারে যে ভবিষ্যতে নিয়ন্ত্রণ ক্ষেত্র জন্য উপলব্ধ.

প্রযুক্তি সমাধান: InfoPath ক্লায়েন্ট ব্যবহার করতে একটি ওয়েব পরিষেবা তৈরি করুন. ওয়েব সার্ভিস পরের ক্রয় অধিযাচন সংখ্যা এবং আপডেটের তালিকা মূল্য ফেরৎ.

শিখেছি পাঠ:

  • InfoPath ফরমের একটি তথ্য উৎস হিসেবে এই ওয়েব পরিষেবা যোগ করার সময়, I found it necessary to convert it to a udc and store it into a data connection library.
  • I also found it necessary to enable cross domain scripting via central services administration // application management // form server configuration.
  • The first time the form tried to access the web service, it takes a while and on occasion, it would time out. I fiddled with settings in form server configuration to expand the timeout settings and that seemed to help.

কোড:

ব্যবহার সিস্টেম;
ব্যবহার System.Web;
ব্যবহার System.Web.Services;
ব্যবহার System.Web.Services.Protocols;
ব্যবহার Microsoft.SharePoint;
ব্যবহার System.Configuration;

[WebService(Namespace = "http://www.conchango.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
জনসাধারণের বর্গ PoService : System.Web.Services.WebService
{
জনসাধারণের PoService () {

//Uncomment the following line if using designed components
//InitializeComponent();
}

/// <সারাংশ>
/// Obtain the next PO number from the sharepoint po number control list.
/// Increment the PO number in that list.
/// </সারাংশ>
/// <returns></returns>
[WebMethod]
জনসাধারণের স্ট্রিং GetNextPoNumber()
{
স্ট্রিং SpPoControlSiteName; // Name of the actual MOSS site that hosts the PO Control list.
স্ট্রিং SpPoControlListName; // Name of the actual MOSS list containing the Po control.

SpPoControlSiteName = ConfigurationSettings.AppSettings["PoControlListHostingSite"].ToString();
SpPoControlListName = ConfigurationSettings.AppSettings["PoControlList"].ToString();

স্ট্রিং nextPoReqNumber = "xyzzy";

ব্যবহার (SPSite site = নতুন SPSite(SpPoControlSiteName))
{
ব্যবহার (SPWeb web = site.OpenWeb())
{

SPList currentList = web.Lists[SpPoControlListName];

foreach (বিদ্বেষ controlItem মধ্যে currentList.Items)
{

যদি (((স্ট্রিং)controlItem["ControlField"]).সমান("NextPoNumber"))
{
nextPoReqNumber = (স্ট্রিং)controlItem["ControlValue"];

int-এ int_nextPoReqNumber;
int_nextPoReqNumber = রূপান্তর.ToInt32(nextPoReqNumber);

int_nextPoReqNumber ;

controlItem["ControlValue"] = int_nextPoReqNumber;
controlItem.Update();
}

} // Locating, reading and updating the PO number in the list.


} // using spweb web = site.openweb()
} // using spsite site = new spsite("http://localhost/mizuho")

প্রত্যাবর্তন nextPoReqNumber;

}
}

এক বিষয়ে চিন্তা "শৈবাল: একটি কাস্টম তালিকা আপডেট করার প্রণালী

  1. KSP wrote:
    উচ্চ পল,
    We have a similar situation what you are mentioning but the problem is i want to use this web servie on a load balance server.Hence,how to handle concurrency requests in this case or how to make the new request wait and only one request should update the list number till then all other requests should be in que.Please let me know how to achieve this.
    আগাম ধন্যবাদ.

একটি উত্তর ত্যাগ KSP wrote: উত্তর বাতিল করুন

আপনার ইমেইল ঠিকানা প্রচার করা হবে না. প্রয়োজনীয় ক্ষেত্রগুলি চিহ্নিত করা আছে *