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(); }
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(); }