示例#1
0
        public int DeleteDivision(string divisionCode, string status)
        {
            string result = string.Empty;

            DataControl.BLDivision  _objBlDivision = new DataControl.BLDivision();
            DataControl.CurrentInfo _objCurInfo    = new DataControl.CurrentInfo();
            return(_objBlDivision.DeleteDivision(_objCurInfo.GetCompanyCode(), divisionCode, status, _objCurInfo.GetUserName()));
        }
示例#2
0
        public JsonResult GetGetDivisionEntityDetails(string divisionCode, string entityType)
        {
            DataControl.BLDivision  _objMapping = new DataControl.BLDivision();
            DataControl.CurrentInfo _objCurInfo = new DataControl.CurrentInfo();
            IEnumerable <MVCModels.DivisionEntityMapping> lstMapping = new List <MVCModels.DivisionEntityMapping>();

            lstMapping = _objMapping.GetDivisionEntityDetails(_objCurInfo.GetCompanyCode(), divisionCode, entityType);
            DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
            return(Json(_objJson.Serialize(lstMapping)));
        }
示例#3
0
 public int InsertDivisionEntityMapping(string divisionCode, string entityCode, string entityName)
 {
     try
     {
         DataControl.CurrentInfo _objCurInfo    = new DataControl.CurrentInfo();
         DataControl.BLDivision  _objBlDivision = new DataControl.BLDivision();
         return(_objBlDivision.DivisionEntityMapping(_objCurInfo.GetCompanyCode(), _objCurInfo.GetUserCode(), _objCurInfo.GetRegionCode(), entityCode, divisionCode, entityName, _objCurInfo.GetUserName()));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         dicObj.Add("EntityCode", entityCode);
         dicObj.Add("divisionCode", divisionCode);
         dicObj.Add("entityName", entityName);
         DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
         return(0);
     }
 }
示例#4
0
        public string GetDivisions()
        {
            StringBuilder strtblContent = new StringBuilder();

            DataControl.CurrentInfo        _objCurInfo    = new DataControl.CurrentInfo();
            DataControl.BLDivision         _objBlDivision = new DataControl.BLDivision();
            List <MVCModels.DivisionModel> lstDivision    = new List <MVCModels.DivisionModel>();

            try
            {
                lstDivision = _objBlDivision.GetDivisions(_objCurInfo.GetCompanyCode());
                strtblContent.Append("<table class='table table-striped'><thead><tr><th>Edit</th><th>Division Name</th><th>Line Of Business</th><th>Status</th><th>Change Status</th></tr></thead><tbody>");
                if (lstDivision.Count > 0)
                {
                    for (int i = 0; i < lstDivision.Count; i++)
                    {
                        strtblContent.Append("<tr><td><a onclick='fnEditDivision(\"" + lstDivision[i].Division_Code + "\");'>Edit</a></td>");
                        strtblContent.Append("<td>" + lstDivision[i].Division_Name + "</td>");
                        strtblContent.Append("<td>" + lstDivision[i].Lineofbussiness + "</td>");
                        if (lstDivision[i].Record_Status == "1")
                        {
                            strtblContent.Append("<td id='tdDelete_" + i + "'>Enabled</td>");
                        }
                        else
                        {
                            strtblContent.Append("<td id='tdDelete_" + i + "'>Disabled</td>");
                        }
                        strtblContent.Append("<td><a onclick='fnDeleteDivision(\"" + lstDivision[i].Division_Code + "\",\"" + lstDivision[i].Record_Status
                                             + "\");'>Change Status</a></td></tr>");
                    }
                    strtblContent.Append("</tbody></table>");
                }
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicObj = new Dictionary <string, string>();
                dicObj.Add("strtblContent", strtblContent.ToString());
                DataControl.Impl.ExceptionHandler.WriteLog(ex: ex, dic: dicObj);
            }
            DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
            return(strtblContent.ToString() + "$" + _objJson.Serialize(lstDivision));
        }
示例#5
0
 public int InsertDivision(string divisionCode, string divisionName, string mode, string divisionline)
 {
     DataControl.BLDivision  _objBlDivision = new DataControl.BLDivision();
     DataControl.CurrentInfo _objCurInfo    = new DataControl.CurrentInfo();
     return(_objBlDivision.InsertDivision(_objCurInfo.GetCompanyCode(), divisionCode, divisionName, mode, _objCurInfo.GetUserName(), divisionline));
 }