public Order_Cost_Details(int Orderid, int User_Id, string OPERATION, string USER_ROLE_ID)
        {
            InitializeComponent();


            userid       = User_Id;
            Operation    = OPERATION;
            Order_Id     = Orderid;
            User_Role_Id = USER_ROLE_ID;

            if (User_Role_Id == "1")
            {
                dbc.BindClientName(ddl_Client_Search);
                int index = ddl_ClientName.FindString("NETCO");

                ddl_ClientName.SelectedIndex = index;
            }
            else
            {
                dbc.BindClientName_For_Order_Cost(ddl_Client_Search);

                string val = "8";
                ddl_ClientName.ValueMember = val.ToString();
                ddl_ClientName.Visible     = false;
                ddl_SubProcess.Visible     = false;
                lbl_Client.Visible         = false;
                lbl_Subprocess.Visible     = false;
            }

            txt_Production_Date.Text = DateTime.Now.ToString();

            if (Order_Id != 0)
            {
                if (Operation == "Insert")
                {
                    load_order_masters();
                    Order_Load();
                    dbc.Bind_Client_Email(ddl_Client_Email, client_Id);
                    txt_Invoice_Order_Number.Visible = true;
                    lbl_Enter_Order.Visible          = true;
                    Group_Order_Numbers.Enabled      = true;

                    txt_Order_Cost_Date.Text = DateTime.Now.ToString();

                    txt_Production_Date.Text = DateTime.Now.ToString();
                }
                else if (Operation == "Update")
                {
                    txt_Invoice_Order_Number.Visible = false;
                    lbl_Enter_Order.Visible          = false;

                    btn_Save.Text = "Edit order Cost";
                    Group_Order_Numbers.Enabled = false;

                    load_order_masters();
                    Order_Load();
                    dbc.Bind_Client_Email(ddl_Client_Email, client_Id);
                    Load_order_Cost_Details();
                }
            }
            bind_OrderList_On_Load();
        }
        private void Rework_Superqc_Order_Entry_Load(object sender, EventArgs e)
        {
            lbl_Order_Prior_Date.Visible = false;
            txt_Order_Prior_Date.Visible = false;
            lbl_order_Prior_mark.Visible = false;


            clientid = int.Parse(ddl_ClientName.SelectedValue.ToString());
            if (User_Role == "1")
            {
                dbc.BindSubProcessName(ddl_SubProcess, clientid);
            }
            else
            {
                dbc.BindSubProcessNumber(ddl_SubProcess, clientid);
            }
            dbc.Bind_Client_Email(ddl_Client_Email, clientid);
            dbc.Bind_Order_Assign_Type(ddl_County_Type);
            dbc.BindAbstractor_Order_Serarh_Type(ddl_Abstractor_Search_Type);
            if (ddl_ClientName.SelectedIndex != 0)
            {
                //  int clientid = int.Parse(ddl_ClientName.SelectedValue.ToString());

                if (User_Role == "1")
                {
                    dbc.BindSubProcessName(ddl_SubProcess, clientid);
                }
                else
                {
                    dbc.BindSubProcessNumber(ddl_SubProcess, clientid);
                }
                // ddl_SubProcess.SelectedValue =Convert.ToString(SubprocessId);
                ddl_SubProcess.Focus();
            }
            Order_Load();
            Get_Order_Search_Cost_Details();
            GridviewbindUser_Task_Orderdata();
            GridviewbindUser_Task_Status_Orderdata();
            Geydview_Bind_Comments();

            if (Order_Id == 0)
            {
                Clear();
            }
            Size search = TextRenderer.MeasureText(lbl_search.Text, lbl_search.Font);

            lbl_search.Width  = search.Width;
            lbl_search.Height = search.Height;
            Size searchqc = TextRenderer.MeasureText(lbl_SearchQC.Text, lbl_SearchQC.Font);

            lbl_SearchQC.Width  = searchqc.Width;
            lbl_SearchQC.Height = searchqc.Height;
            Size typing = TextRenderer.MeasureText(lbl_Typing.Text, lbl_Typing.Font);

            lbl_Typing.Width  = typing.Width;
            lbl_Typing.Height = typing.Height;
            Size typingqc = TextRenderer.MeasureText(lbl_TypingQC.Text, lbl_TypingQC.Font);

            lbl_TypingQC.Width  = typingqc.Width;
            lbl_TypingQC.Height = typingqc.Height;
            Size upload = TextRenderer.MeasureText(lbl_Upload.Text, lbl_Upload.Font);

            lbl_Upload.Width  = upload.Width;
            lbl_Upload.Height = upload.Height;


            Size final_qc = TextRenderer.MeasureText(lbl_Final_Qc.Text, lbl_Final_Qc.Font);

            lbl_Final_Qc.Width  = final_qc.Width;
            lbl_Final_Qc.Height = final_qc.Height;


            Size exception = TextRenderer.MeasureText(lbl_Exception.Text, lbl_Exception.Font);

            lbl_Exception.Width  = exception.Width;
            lbl_Exception.Height = exception.Height;



            Size searcht = TextRenderer.MeasureText(lbl_STask.Text, lbl_STask.Font);

            lbl_STask.Width  = searcht.Width;
            lbl_STask.Height = searcht.Height;
            Size searchqct = TextRenderer.MeasureText(lbl_ScTask.Text, lbl_ScTask.Font);

            lbl_ScTask.Width  = searchqct.Width;
            lbl_ScTask.Height = searchqct.Height;
            Size typingt = TextRenderer.MeasureText(lbl_Ttask.Text, lbl_Ttask.Font);

            lbl_Ttask.Width  = typingt.Width;
            lbl_Ttask.Height = typingt.Height;
            Size typingqct = TextRenderer.MeasureText(lbl_TcTask.Text, lbl_TcTask.Font);

            lbl_TcTask.Width  = typingqct.Width;
            lbl_TcTask.Height = typingqct.Height;
            Size uploadt = TextRenderer.MeasureText(lbl_UTask.Text, lbl_UTask.Font);

            lbl_UTask.Width  = uploadt.Width;
            lbl_UTask.Height = uploadt.Height;

            Size final_qc_task = TextRenderer.MeasureText(lbl_Final_Qc_Task.Text, lbl_Final_Qc_Task.Font);

            lbl_Final_Qc_Task.Width  = final_qc_task.Width;
            lbl_Final_Qc_Task.Height = final_qc_task.Height;


            Size exception_task = TextRenderer.MeasureText(lbl_Exception_Task.Text, lbl_Exception_Task.Font);

            lbl_Exception_Task.Width  = exception_task.Width;
            lbl_Exception_Task.Height = exception_task.Height;
        }