protected void ibnSave_Click(object sender, ImageClickEventArgs e) { Biz_ButtonCommandRoleMaps btnCmdRoleMap = new Biz_ButtonCommandRoleMaps(); DataTable dataTable = btnCmdRoleMap.GetDataTableSchema(); dataTable = UltraGridUtility.GetDataTableByCheckValue(UltraWebGrid2 , "cBox" , "selchk" , new string[] { "COMMAND_NAME" } , dataTable); foreach (DataRow dataRow in dataTable.Rows) { dataRow["ROLE_REF_ID"] = hdfRoleRefID.Value; dataRow["DATE"] = DateTime.Now; dataRow["USER"] = EMP_REF_ID; } bool isOK = btnCmdRoleMap.SaveButtonCommandRoleMap(dataTable, DataTypeUtility.GetToInt32(hdfRoleRefID.Value)); ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다.", false); //if (isOK) //{ // ltrScript.Text = JSHelper.GetAlertScript("삭제할 항목을 선택주세요.", false); // return; //} //else //{ // //ltrScript.Text = JSHelper.GetAlertScript("삭제할 항목을 선택주세요.", false); //} }
private void BindingCommandNameRoleMap(int role_ref_id) { Biz_ButtonCommandRoleMaps btnCmdRoleMap = new Biz_ButtonCommandRoleMaps(); _dtButtonCommandRole = btnCmdRoleMap.GetButtonCommandRoleMap(role_ref_id, "").Tables[0]; Biz_ButtonCommandInfos btnCmdInfo = new Biz_ButtonCommandInfos(); UltraWebGrid2.DataSource = btnCmdInfo.GetButtonCommandInfos(); UltraWebGrid2.DataBind(); }
public static void SetButtonVisibleCommandNameByRolID(int emp_ref_id, ImageButton ibn) { Biz_ButtonCommandRoleMaps btnRoleMap = new Biz_ButtonCommandRoleMaps(); DataTable dataTable = btnRoleMap.GetButtonCommandsByEmpID(emp_ref_id).Tables[0]; string command_name = ibn.CommandName; // COMMAND_NAME를 부여한 ImageButton만 처리한다. if (!command_name.Equals("") && ibn.Visible == false) { if (dataTable.Select(string.Format("COMMAND_NAME = '{0}'", command_name)).Length > 0) { ibn.Visible = true; } } }