Ejemplo n.º 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (ddlItemType.SelectedValue.ToString() == "0")
            {
                // IQCareWindowMsgBox.ShowWindow("ItemTypeSelect", this);
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Item type";
                IQCareWindowMsgBox.ShowWindow("BlankDropDown", theBuilder, this);
                ddlItemType.Focus();
                return;
            }
            arrSubItemList = new ArrayList();
            for (int i = 0; i < chkSubItemTypeList.Items.Count; i++)
            {
                if (chkSubItemTypeList.GetItemChecked(i) == true)
                {
                    arrSubItemList.Add((((System.Data.DataRowView)(chkSubItemTypeList.Items[i])).Row.ItemArray[0]).ToString());
                }
            }
            string      ItemType      = ddlItemType.SelectedValue.ToString();
            IMasterList objMasterlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            int         ret           = objMasterlist.SaveSubItemList(arrSubItemList, Convert.ToInt32(ddlItemType.SelectedValue), GblIQCare.AppUserId);

            theDrugTypeDT = ((DataSet)objMasterlist.GetDrugType(Convert.ToInt32(ItemType))).Tables[0];
            if (ret > 0)
            {
                IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
                return;
            }
        }