示例#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.GetDrugTypeIQMGT(Convert.ToInt32(ItemType))).Tables[0];
            if (ret > 0)
            {
                IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
                return;
            }
        }
示例#2
0
        private void BindDrugTypeListByItemID(int itemID)
        {
            IMasterList objDrugTypelist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            int         ItemTypeid      = 0;

            if (ddlItemType.SelectedIndex > 0)
            {
                ItemTypeid = Convert.ToInt32(ddlItemType.SelectedValue.ToString());
            }
            DataSet theDS = objDrugTypelist.GetDrugTypeIQMGT(ItemTypeid);

            theDrugTypeDT = theDS.Tables[0];
            //theDrugType = theDS.Tables[1];


            DataView theDV = new DataView(theDrugTypeDT);

            theDV.RowFilter = "ItemTypeID=" + itemID.ToString() + " and Status='Active'";
            DataTable theDT = theDV.ToTable();



            chkSubItemTypeList.DataSource = null;
            chkSubItemTypeList.Items.Clear();
            BindFunctions theBind = new BindFunctions();

            theBind.Win_BindCheckListBox(chkSubItemTypeList, theDrugTypeDT, "SubTypeName", "SubItemTypeID");



            for (int i = 0; i < theDT.Rows.Count; i++)
            {
                for (int j = 0; j < chkSubItemTypeList.Items.Count; j++)
                {
                    if (Convert.ToInt32(theDT.Rows[i]["ItemTypeID"]) == itemID && theDT.Rows[i]["SubTypeName"].ToString() == chkSubItemTypeList.GetItemText(chkSubItemTypeList.Items[j]))
                    {
                        this.chkSubItemTypeList.SetItemChecked(j, true);
                    }
                }
            }
            bool IsAllcheck = true;

            for (int i = 0; i < chkSubItemTypeList.Items.Count; i++)
            {
                if (chkSubItemTypeList.GetItemChecked(i) == false)
                {
                    IsAllcheck = false;
                    break;
                }
            }
            chktype.Checked = IsAllcheck;
        }
示例#3
0
        private void BindItemTypeDropdown()
        {
            IQCareUtils theUtils = new IQCareUtils();

            ddlItemType.Items.Clear();
            IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataSet     theDT          = objProgramlist.GetDrugTypeIQMGT(0);
            //DataView theDV = new DataView(theDT);
            //theDV.RowFilter = "ItemType <> 'Lab Tests' and DeleteFlag = 0";
            BindFunctions theBind = new BindFunctions();

            theBind.Win_BindCombo(ddlItemType, theDT.Tables[1], "Name", "ID");
        }
示例#4
0
        private void BindDrugTypeList()
        {
            IQCareUtils theUtils = new IQCareUtils();
            //chkSubItemTypeList.Items.Clear();
            IMasterList objDrugTypelist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            int         ItemTypeid      = 0;

            if (ddlItemType.SelectedIndex > 0)
            {
                ItemTypeid = Convert.ToInt32(ddlItemType.SelectedValue.ToString());
            }
            DataSet theDS = objDrugTypelist.GetDrugTypeIQMGT(ItemTypeid);

            theDrugTypeDT = theDS.Tables[0];
            theDrugType   = theDS.Tables[1];
            ////////DataView theDV = new DataView(theDT);
            ////////theDV.RowFilter = "DeleteFlag = 0";
            BindFunctions theBind = new BindFunctions();

            theBind.Win_BindCheckListBox(chkSubItemTypeList, theDrugTypeDT, "SubTypeName", "SubItemTypeID");
        }