Example #1
0
        private void UpdateChecklIst()
        {
            m_lGridId = 0;

            if (m_bAdd == false)
            {
                m_lGridId = Convert.ToInt32(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId"));
            }

            oChkLstBo = new CheckListBO()
            {
                CheckListId = m_lGridId, CheckListName = (grdViewDoc.GetFocusedRowCellValue("CheckListName").ToString()), TypeName = m_sType
            };


            if (m_bAdd == true)
            {
                m_bAns = true;
                oChkLstBo.SortOrder = grdViewDoc.RowCount;
                int iCId = BankBL.InsertCheckList(oChkLstBo);
                grdViewDoc.SetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId", iCId);
                grdViewDoc.SetRowCellValue(grdViewDoc.FocusedRowHandle, "SysDefault", false);
                grdViewDoc.SetRowCellValue(grdViewDoc.FocusedRowHandle, "SortOrder", oChkLstBo.SortOrder);
                //CommFun.InsertLog(DateTime.Now, "Check List-Add", "N", "Add Check List", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                BsfGlobal.InsertLog(DateTime.Now, "Check List-Add", "N", "Add Check List", m_lGridId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
                m_bAns = false;
            }
            else
            {
                BankBL.UpdateCheckList(oChkLstBo);
                //CommFun.InsertLog(DateTime.Now, "Check List-Edit", "E", "Edit Check List", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                BsfGlobal.InsertLog(DateTime.Now, "Check List-Edit", "E", "Edit Check List", m_lGridId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
            }
        }
Example #2
0
 public static void UpdateCheckList(CheckListBO argObject)
 {
     try
     {
         SqlCommand cmd;
         string     sSql = "Update dbo.CheckListMaster set CheckListName='" + argObject.CheckListName + "',TypeName='" + argObject.TypeName + "' Where CheckListId=" + argObject.CheckListId + "";
         BsfGlobal.OpenCRMDB();
         cmd = new SqlCommand(sSql, BsfGlobal.g_CRMDB);
         cmd.ExecuteNonQuery();
         cmd.Dispose();
     }
     catch (Exception ex)
     {
         BsfGlobal.CustomException(ex.Message, ex.StackTrace);
     }
     finally
     {
         BsfGlobal.g_CRMDB.Close();
     }
 }
Example #3
0
        public static int InsertCheckList(CheckListBO argObject)
        {
            int identity = 0;

            try
            {
                SqlCommand cmd;
                string     sSql = "Insert into dbo.CheckListMaster (TypeName,CheckListName,SortOrder)" +
                                  "Values('" + argObject.TypeName + "','" + argObject.CheckListName + "'," + argObject.SortOrder + ") SELECT SCOPE_IDENTITY();";
                BsfGlobal.OpenCRMDB();
                cmd      = new SqlCommand(sSql, BsfGlobal.g_CRMDB);
                identity = int.Parse(cmd.ExecuteScalar().ToString());
                cmd.Dispose();
            }
            catch (Exception ex)
            {
                BsfGlobal.CustomException(ex.Message, ex.StackTrace);
            }
            finally
            {
                BsfGlobal.g_CRMDB.Close();
            }
            return(identity);
        }
Example #4
0
 public static void UpdateCheckList(CheckListBO argObject)
 {
     BankDL.UpdateCheckList(argObject);
 }
Example #5
0
 public static int InsertCheckList(CheckListBO argObject)
 {
     return(BankDL.InsertCheckList(argObject));
 }