コード例 #1
0
        private void Init_Form()
        {
            IMasterList objStoreList = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");

            dsStoreList = objStoreList.GetStoreUserLink(0);
            BindStoreDropdown();
        }
コード例 #2
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;
            }
        }
コード例 #3
0
        /// <summary>
        /// Handles the Click event of the btnSave control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                List <int> UserList = new List <int>();
                int        storeId  = Convert.ToInt32(ddlStore.SelectedValue);
                for (int i = 0; i < chkItemList.Items.Count; i++)
                {
                    if (chkItemList.GetItemChecked(i) == true)
                    {
                        UserList.Add(Convert.ToInt32((((System.Data.DataRowView)(chkItemList.Items[i])).Row.ItemArray[0]).ToString()));
                    }
                }

                //string ItemType = ddlItemType.SelectedValue.ToString();
                IMasterList objMasterlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                int         ret           = objMasterlist.SaveUpdateStoreUserLinking(storeId, UserList);
                dsStoreList = objMasterlist.GetStoreUserLink(storeId);
                BindItemList();
                //  BindStoreDropdown();
                if (ret > 0)
                {
                    IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
                    return;
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #4
0
        private void BindStoreName()
        {
            StoreID = GblIQCare.intStoreId;
            //ddlSourceStore.Enabled = true;
            BindFunctions theBind = new BindFunctions();
            DataSet       XMLDS   = new DataSet();

            XMLDS.ReadXml(GblIQCare.GetXMLPath() + "\\AllMasters.con");
            DataView  theDV;
            DataTable theStoreDT;

            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            IQCareUtils theUtils          = new IQCareUtils();
            DataSet     theDS             = objItemCommonlist.GetStoreDetail();


            ddlSourceStore.Enabled = true;
            theDV           = new DataView(theDS.Tables[2]);
            theDV.RowFilter = "Id <>" + StoreID;
            theStoreDT      = theDV.ToTable();

            theBind.Win_BindCombo(ddlSourceStore, theStoreDT, "Name", "Id");

            theDV           = new DataView(XMLDS.Tables["Mst_Store"]);
            theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null) and  ( Id =" + StoreID + ")";
            theStoreDT      = theDV.ToTable();
            //theBind.Win_BindCombo(ddlDestinationStore, theStoreDT, "Name", "Id");
            ddlDestinationStore.DataSource    = theStoreDT;
            ddlDestinationStore.DisplayMember = "Name";
            ddlDestinationStore.ValueMember   = "Id";
        }
コード例 #5
0
        private void BindStoreNameDropdown(int UserID)
        {
            IQCareUtils theUtils = new IQCareUtils();

            ddlStoreName.Items.Clear();
            IMasterList   objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataTable     theDT          = objProgramlist.GetStoreByUser(UserID);
            DataView      theDV          = new DataView(theDT);
            BindFunctions theBind        = new BindFunctions();

            if ((GblIQCare.theArea == "PO") || (GblIQCare.theArea == "GRN"))
            {
                theDV.RowFilter = "CentralStore=1";
            }
            else if ((GblIQCare.theArea == "Dispense") || (GblIQCare.theArea == "IV") || (GblIQCare.theArea == "CR"))
            {
                theDV.RowFilter = "CentralStore=0";
            }
            DataTable theStoreDT = theDV.ToTable();

            theBind.Win_BindCombo(ddlStoreName, theStoreDT, "StoreName", "StoreId");
            if (theDT.Rows.Count == 2)
            {
                ddlStoreName.SelectedIndex = 1;
                ddlStoreName.Enabled       = false;
            }
        }
コード例 #6
0
        private void ddlStore_SelectionChangeCommitted(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToInt32(ddlStore.SelectedValue) != 0)
                {
                    BindFunctions theBindManager = new BindFunctions();


                    IMasterList obj = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                    this.dtStoreItems = obj.GetItemByStoreId(Convert.ToInt32(ddlStore.SelectedValue));
                    //
                    //  DataSet theDS = GetItems(Convert.ToInt32(ddlStore.SelectedValue), Convert.ToInt32(lstSearch.SelectedValue), Convert.ToDateTime(dtpFrom.Text), Convert.ToDateTime(dtpTo.Text));
                    //  //theBindManager.Win_BindListBox(lstSearch, theDS.Tables[0], "DrugName", "Drug_pk");
                    // theDTItems = theDS.Tables[1];
                    //ShowGrid(theDS.Tables[1]);
                }
                else
                {
                    txtItemName.Text = "";
                    dgwStockSummary.Columns.Clear();
                    dgwStockSummary.DataSource = null;
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #7
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            IMasterList objSupplierlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            int         retrows         = objSupplierlist.SaveSupplierList(theDT, GblIQCare.AppUserId);

            IQCareWindowMsgBox.ShowWindow("SupplierSave", this);
            Init_Form();
        }
コード例 #8
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            IMasterList objpdonorLnk = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            int         retrows      = objpdonorLnk.SaveProgramDonorLnk(theDT, GblIQCare.AppUserId);

            IQCareWindowMsgBox.ShowWindow("DonorSave", this);
            Init_Form();
        }
コード例 #9
0
ファイル: frmSupplierItem.cs プロジェクト: wamathaga/IQCare
        private void BindItemList(int itemTypeId, int subitemId, int Supplierid)
        {
            //try
            //{
            chkItemList.DataSource = null;
            IMasterList objItemlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataSet     theDS       = objItemlist.GetItemListSupplier(itemTypeId, subitemId, Supplierid);

            theItemListDT = theDS.Tables[0];
            theItemList   = theDS.Tables[1];
            BindFunctions theBind = new BindFunctions();

            //DataView theDV = new DataView(theItemList);
            //theDV.RowFilter = "ItemTypeID =" + Convert.ToInt32(ddlItemType.SelectedValue.ToString());

            theBind.Win_BindCheckListBox(chkItemList, theItemList, "ItemName", "ItemID");
            // theBind.Win_BindCheckListBox(chkItemList, theDV.ToTable(), "ItemName", "ItemID");
            //for (int i = 0; i < drglbItemList.Rows.Count; i++)
            //{
            //    if (drglbItemList.Rows[i]["MappedItem"].ToString() == "True")
            //    {
            //        this.chkItemList.SetItemChecked(i, true);
            //    }
            //}
            for (int i = 0; i < theItemListDT.Rows.Count; i++)
            {
                for (int j = 0; j < chkItemList.Items.Count; j++)
                {
                    if (Convert.ToInt32(theItemListDT.Rows[i]["ItemTypeID"]) == itemTypeId && Convert.ToInt32(theItemListDT.Rows[i]["ItemID"]) == Convert.ToInt32((((System.Data.DataRowView)(chkItemList.Items[j])).Row.ItemArray[0]).ToString()) && theItemListDT.Rows[i]["ItemName"].ToString() == chkItemList.GetItemText(chkItemList.Items[j]))
                    {
                        this.chkItemList.SetItemChecked(j, true);
                    }
                }
            }
            bool IsAllcheck = true;

            for (int i = 0; i < chkItemList.Items.Count; i++)
            {
                if (chkItemList.GetItemChecked(i) == false)
                {
                    IsAllcheck = false;
                    break;
                }
            }
            chkAll.Checked = IsAllcheck;

            if (chkItemList.Items.Count == 0)
            {
                chkAll.Checked = false;
            }
            //}
            //catch (Exception err)
            //{
            //    MsgBuilder theBuilder = new MsgBuilder();
            //    theBuilder.DataElements["MessageText"] = err.Message.ToString();
            //    IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            //}
        }
コード例 #10
0
        private void Init_Form()
        {
            IMasterList objSupplierList = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataSet     dsSupplierList  = objSupplierList.GetSupplierList();

            MaxPId = Convert.ToInt32(dsSupplierList.Tables[1].Rows[0][0]);
            ShowGrid(dsSupplierList.Tables[0]);
            Clear_Form();
        }
コード例 #11
0
        private void Init_Form()
        {
            IMasterList objpDonorlink = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");

            dsPDonorLink = objpDonorlink.GetProgramDonorLnk();
            BindDropdown();
            ShowGrid(dsPDonorLink.Tables[2]);
            Clear_Form();
        }
コード例 #12
0
        private void Init_Form()
        {
            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");

            theDs = objItemCommonlist.GetStoreDetail();
            if (theDs.Tables[0].Rows.Count > 0)
            {
                BindFunctions theBindManager = new BindFunctions();
                theBindManager.Win_BindCombo(cmbStore, theDs.Tables[0], "Name", "Id");
            }
        }
コード例 #13
0
        public DataTable PopulateItemSubTypeDT(int ItemTypeId)
        {
            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataTable   DTSubItemlist     = new DataTable();

            DTSubItemlist = objItemCommonlist.GetFilteredSubItemType(ItemTypeId);
            //DTSubItemlist.Columns[0].ColumnName = "SubItemTypeId";
            //DTSubItemlist.Columns[1].ColumnName = "SubTypeName";
            DTSubItemlist.AcceptChanges();

            return(DTSubItemlist);
        }
コード例 #14
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;
        }
コード例 #15
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");
        }
コード例 #16
0
 /// <summary>
 /// Handles the SelectedIndexChanged event of the ddlStore control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void ddlStore_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlStore.SelectedIndex != 0 && Convert.ToInt32(ddlStore.SelectedValue.ToString()) > 0)
     {
         IMasterList objStoreList = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         dsStoreList = objStoreList.GetStoreUserLink(Convert.ToInt32(ddlStore.SelectedValue.ToString()));
         BindItemList();
     }
     else
     {
         chkItemList.DataSource = null;
     }
 }
コード例 #17
0
        private void BindStoreNameDropdown(int UserID)
        {
            IQCareUtils theUtils = new IQCareUtils();

            ddlStoreName.Items.Clear();
            IMasterList   objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataTable     theDT          = objProgramlist.GetStoreByUser(UserID);
            DataView      theDV          = new DataView(theDT);
            BindFunctions theBind        = new BindFunctions();

            switch (GblIQCare.CurrentMenu)
            {
            case MenuChoice.PurchaseOrder:      //purchase order or good received note
            case MenuChoice.GoodReceived:
            case MenuChoice.POWithGRN:
                theDV.RowFilter = "StoreCategory = 'Purchasing' OR StoreCategory = 'Purchasing and Dispensing' ";
                break;

            case MenuChoice.Dispense:
                theDV.RowFilter = "StoreCategory = 'Dispensing' OR StoreCategory = 'Purchasing and Dispensing' ";
                break;

            case MenuChoice.CounterRequistion:     //counter requisition
            case MenuChoice.CRWithIV:
                theDV.RowFilter = "StoreCategory <> 'Purchasing' OR StoreCategory <> 'Purchasing and Dispensing' ";
                break;
            }

            /*switch (GblIQCare.theArea)
             * {
             *  case  "PO":  //purchase order or good received note
             *  case "GRN":
             *       theDV.RowFilter = "StoreCategory = 'Purchasing' ";
             *      break;
             *  case "Dispense":
             *      theDV.RowFilter = "StoreCategory = 'Dispensing' ";
             *      break;
             *  case "CR": //counter requisition
             *      theDV.RowFilter = "StoreCategory <> 'Purchasing' ";
             *      break;
             * }*/

            DataTable theStoreDT = theDV.ToTable();

            theBind.Win_BindCombo(ddlStoreName, theStoreDT, "StoreName", "StoreId", "StoreName");
            if (theDT.Rows.Count == 1)
            {
                ddlStoreName.SelectedIndex = 0;
                //ddlStoreName.Enabled = false;
            }
        }
コード例 #18
0
        private void BindItemTypeDropdown()
        {
            IQCareUtils theUtils = new IQCareUtils();

            ddlItemType.Items.Clear();
            IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataTable   theDT          = objProgramlist.GetBillingGroups();

            DataView theDV = new DataView(theDT);

            theDV.RowFilter = "DeleteFlag = 0";
            BindFunctions theBind = new BindFunctions();

            theBind.Win_BindCombo(ddlItemType, theDV.ToTable(), "Name", "BillingTypeID");
        }
コード例 #19
0
 private void ddlStore_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlStore.SelectedIndex != 0 && Convert.ToInt32(ddlStore.SelectedValue.ToString()) > 0)
     {
         IMasterList objStoreList = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         dsStoreList = objStoreList.GetStoreUserLink(Convert.ToInt32(ddlStore.SelectedValue.ToString()));
         BindItemList();
     }
     else
     {
         BindFunctions theBind = new BindFunctions();
         chkItemList.DataSource = null;
         theBind.Win_BindCheckListBox(chkItemList, dsStoreList.Tables[1], "UserName", "UserID");
     }
 }
コード例 #20
0
        private void BindCombo()
        {
            try
            {
                DataSet   XMLDS = new DataSet();
                DataView  theDV;
                DataTable theStoreDT = new DataTable();
                XMLDS.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con"));

                if (XMLDS == null)
                {
                    IMasterList thePharmacyManager1 = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM");
                    XMLDS = thePharmacyManager1.GetStoreDetail();
                    theDV = new DataView(XMLDS.Tables[0]);
                }
                else if ((XMLDS != null) && (XMLDS.Tables.Count < 0))
                {
                    IMasterList thePharmacyManager1 = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM");
                    XMLDS = thePharmacyManager1.GetStoreDetail();
                    theDV = new DataView(XMLDS.Tables[0]);
                }
                else
                {
                    DataTable dt = XMLDS.Tables["Mst_Store"];

                    if (dt == null || dt.Rows.Count <= 0)
                    {
                        IMasterList thePharmacyManager1 = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM");

                        XMLDS           = thePharmacyManager1.GetStoreDetail();
                        theDV           = new DataView(XMLDS.Tables[0]);
                        theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null)";
                        ///              theDV.Sort = "Name ASC";
                        ///
                        theStoreDT = theDV.Table;
                    }
                }


                theBindManager.BindCombo(ddlStore, theStoreDT, "Name", "Id");
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareMsgBox.Show("#C1", theBuilder, this);
            }
        }
コード例 #21
0
        private void Init_Form()
        {
            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            String      TableName         = "Mst_" + GblIQCare.ItemTableName;

            DTItemlist = objItemCommonlist.GetCommonItemList(GblIQCare.ItemCategoryId, TableName);
            if (DTItemlist.Rows.Count > 0)
            {
                if (TableName != "Mst_Drugtype")
                {
                    MaxPId = Convert.ToInt32(DTItemlist.Select("SRNo=MAX(SRNo)")[0].ItemArray[3]);
                }
            }
            ShowGrid(DTItemlist);
            Clear_Form();
        }
コード例 #22
0
        private void BindTreeView()
        {
            IMasterList theItemManager = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM");
            DataSet     theDS          = theItemManager.GetItemMasterListing();

            theDrugListing = theDS.Tables[0];
            string theItemType     = "";
            string theDrugTypeName = "";
            string theGenericName  = "";
            //string theDrugName="";
            TreeNode theRootNode        = new TreeNode();
            TreeNode theRootDTypeNode   = new TreeNode();
            TreeNode theRootGenericNode = new TreeNode();

            foreach (DataRow theDR in theDS.Tables[0].Rows)
            {
                if (theItemType != theDR["ItemTypeName"].ToString())
                {
                    theRootNode      = new TreeNode();
                    theRootNode.Text = theDR["ItemTypeName"].ToString();
                    tvSCMlist.Nodes.Add(theRootNode);
                    theItemType = theDR["ItemTypeName"].ToString();
                }
                if (theDrugTypeName != theDR["DrugTypeName"].ToString())
                {
                    theRootDTypeNode      = new TreeNode();
                    theRootDTypeNode.Text = theDR["DrugTypeName"].ToString();
                    theRootNode.Nodes.Add(theRootDTypeNode);
                    theDrugTypeName = theDR["DrugTypeName"].ToString();
                }
                if (theGenericName != theDR["GenericName"].ToString())
                {
                    theRootGenericNode      = new TreeNode();
                    theRootGenericNode.Text = theDR["GenericName"].ToString();
                    theRootDTypeNode.Nodes.Add(theRootGenericNode);
                    theGenericName = theDR["GenericName"].ToString();
                }
                if (theDR["DrugName"].ToString() != "")
                {
                    TreeNode theDrugNode = new TreeNode();
                    theDrugNode.Text = theDR["DrugName"].ToString();
                    theDrugNode.Tag  = theItemType + "-" + theDrugTypeName + "-" + theDR["Drug_Pk"].ToString();
                    theRootGenericNode.Nodes.Add(theDrugNode);
                }
            }
        }
コード例 #23
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         String      TableName   = "Mst_" + GblIQCare.ItemTableName;
         IMasterList objItemlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         int         retrows     = objItemlist.SaveUpdateItemList(DTItemlist, GblIQCare.ItemCategoryId, TableName, GblIQCare.AppUserId);
         IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
         Init_Form();
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #24
0
 private void theButton_Click(object sender, EventArgs e)
 {
     try
     {
         IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         IQCareUtils theUtils          = new IQCareUtils();
         theDS = objItemCommonlist.GetStoreDetail();
         BindDropdown(theDS.Tables[3]);
         showgrid(theDS.Tables[1]);
         objItemCommonlist = null;
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #25
0
ファイル: frmSupplierItem.cs プロジェクト: wamathaga/IQCare
        private void BindItemListStore(int StoreId)
        {
            try
            {
                chkItemList.DataSource = null;
                IMasterList objItemlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                DataSet     theDS       = objItemlist.GetItemListStore(StoreId);
                theItemListDT = theDS.Tables[0];
                theItemList   = theDS.Tables[1];
                BindFunctions theBind = new BindFunctions();
                theBind.Win_BindCheckListBox(chkItemList, theItemListDT, "ItemName", "ItemID");

                if (theItemList.Rows.Count > 0 && StoreId > 0)
                {
                    for (int j = 0; j < theItemList.Rows.Count; j++)
                    {
                        for (int i = 0; i < theItemListDT.Rows.Count; i++)
                        {
                            if (Convert.ToInt32(theItemListDT.Rows[i]["ItemID"]) == Convert.ToInt32(theItemList.Rows[j]["ItemID"]))
                            {
                                this.chkItemList.SetItemChecked(i, true);
                            }
                        }
                    }
                }
                bool IsAllcheck = true;
                for (int i = 0; i < chkItemList.Items.Count; i++)
                {
                    if (chkItemList.GetItemChecked(i) == false)
                    {
                        IsAllcheck = false;
                        break;
                    }
                }
                chkAll.Checked = IsAllcheck;
            }

            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #26
0
        private void PopulateItemType()
        {
            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            String      TableName         = "Mst_Decode";
            DataTable   DTItemlist        = new DataTable();

            DTItemlist = objItemCommonlist.GetItemTypeList();
            BindFunctions BindManager = new BindFunctions();
            DataSet       theDS       = objItemCommonlist.GetItemDetails(Convert.ToInt32(0));

            if (DTItemlist.Rows.Count > 0)
            {
                BindManager.BindCombo((DropDownList)ddlItemType, DTItemlist, "Name", "ID");
            }

            BindManager.BindCombo(ddlpurchaseunit, theDS.Tables[3].Copy(), "Name", "Id");
            BindManager.BindCombo(ddlmanufaturer, theDS.Tables[4], "Name", "Id");
            BindManager.BindCombo(ddldispensingunit, theDS.Tables[3].Copy(), "Name", "Id");
            BindManager.BindCombo(ddlVolumeUnit, theDS.Tables[6].Copy(), "Name", "Id");
        }
コード例 #27
0
ファイル: frmSupplierItem.cs プロジェクト: wamathaga/IQCare
 private void BindItemsubTypeDropdown(string ItemTypeId)
 {
     try
     {
         IQCareUtils theUtils = new IQCareUtils();
         ddlItemSubType.DataSource = null;
         IMasterList   objSubitemType = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         DataTable     theDT          = objSubitemType.GetSubItemType();
         BindFunctions theBind        = new BindFunctions();
         DataView      theDV          = new DataView(theDT);
         theDV.RowFilter = "ItemTypeId =" + ItemTypeId;
         theBind.Win_BindCombo(ddlItemSubType, theDV.ToTable(), "DrugTypeName", "drugTypeID");
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #28
0
        public static ArrayList PopulateItemSubType(int ItemTypeId)
        {
            ArrayList   list = new ArrayList();
            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataTable   DTSubItemlist     = new DataTable();

            DTSubItemlist = objItemCommonlist.GetFilteredSubItemType(ItemTypeId);
            //DTSubItemlist.Columns[0].ColumnName = "SubItemTypeId";
            //DTSubItemlist.Columns[1].ColumnName = "SubTypeName";
            DTSubItemlist.AcceptChanges();
            foreach (DataRow sdr in DTSubItemlist.Rows)
            {
                list.Add(new ListItem(
                             sdr["SubTypeName"].ToString(),
                             sdr["SubItemTypeId"].ToString()
                             ));
            }

            return(list);
        }
コード例 #29
0
ファイル: frmSupplierItem.cs プロジェクト: wamathaga/IQCare
        private void BindItemListStore_Filtered(int itemTypeId, int subitemId, int StoreId)
        {
            //try
            //{
            chkItemList.DataSource = null;
            IMasterList objItemlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            DataSet     theDS       = objItemlist.GetItemListStore_Filtered(itemTypeId, subitemId, StoreId);

            theItemListDT = theDS.Tables[0];
            theItemList   = theDS.Tables[1];
            BindFunctions theBind = new BindFunctions();

            theBind.Win_BindCheckListBox(chkItemList, theItemList, "ItemName", "ItemID");

            for (int i = 0; i < theItemListDT.Rows.Count; i++)
            {
                for (int j = 0; j < chkItemList.Items.Count; j++)
                {
                    if (Convert.ToInt32(theItemListDT.Rows[i]["ItemTypeID"]) == itemTypeId && Convert.ToInt32(theItemListDT.Rows[i]["ItemID"]) == Convert.ToInt32((((System.Data.DataRowView)(chkItemList.Items[j])).Row.ItemArray[0]).ToString()) && theItemListDT.Rows[i]["ItemName"].ToString() == chkItemList.GetItemText(chkItemList.Items[j]))
                    {
                        this.chkItemList.SetItemChecked(j, true);
                    }
                }
            }
            bool IsAllcheck = true;

            for (int i = 0; i < chkItemList.Items.Count; i++)
            {
                if (chkItemList.GetItemChecked(i) == false)
                {
                    IsAllcheck = false;
                    break;
                }
            }
            chkAll.Checked = IsAllcheck;

            if (chkItemList.Items.Count == 0)
            {
                chkAll.Checked = false;
            }
        }
コード例 #30
0
        private void Init_Form()
        {
            IMasterList objItemCommonlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
            String      TableName         = "Mst_" + GblIQCare.ItemTableName;

            DTItemlist = objItemCommonlist.GetCommonItemList(GblIQCare.ItemCategoryId, TableName, GblIQCare.AppLocationId);
            if (DTItemlist.Rows.Count > 0)
            {
                if (TableName != "Mst_Drugtype")
                {
                    if (TableName == "Mst_Decode")
                    {
                        DataRow[] theDR = DTItemlist.Select("CodeId = " + GblIQCare.ItemCategoryId + "");
                        theDR = DTItemlist.Select("SRNo=MAX(SRNo)");
                        if (theDR.Length > 0)
                        {
                            MaxPId = Convert.ToInt32(theDR[0][3]);
                        }
                        else
                        {
                            MaxPId = 0;
                        }
                    }
                    else
                    {
                        DataRow[] theDR = DTItemlist.Select("SRNo=MAX(SRNo)");
                        if (theDR.Length > 0)
                        {
                            MaxPId = Convert.ToInt32(theDR[0][0]);
                        }
                        else
                        {
                            MaxPId = 0;
                        }
                        ///MaxPId = Convert.ToInt32(DTItemlist.Select("SRNo=MAX(SRNo)")[0].ItemArray[3]);
                    }
                }
            }
            ShowGrid(DTItemlist);
            Clear_Form();
        }